From Cppreference
|
|
| int compare( const sub_match& m ) const;
| (1)
| (since C++11)
|
|
|
|
| int compare( const string_type& s ) const;
| (2)
| (since C++11)
|
|
|
|
| int compare( const value_type* c ) const;
| (3)
| (since C++11)
|
|
|
|
1) Compares two sub_match directly by comparing their underlying character sequences. This function is implemented as follows.
2) Compares a sub_match with a std::basic_string. This function is implemented as follows.
3) Compares a sub_match with a C-style NULL-terminated sequence of teh underlying character type. This function is implemented as follows.
This function is infrequently used directly by application code. Instead, one of the non-member comparison operators are used.
[edit] Parameters
| m
| -
| A pointer to another sub_match.
|
| s
| -
| A pointer to a std::basic_string to compare.
|
| c
| -
| A pointer to a C-style null-terminated character sequence of the underlying value_type to compare.
|
[edit] Return value
A value less than zero if this sub_match is less than the other character sequence, zero if the both underlyinging character sequences are equal, greater than zero if this sub_match is greater than the other character sequence.
[edit] Example
[edit] See also
|
|
|
| compares two strings (public member function)
|